<?php include("../actions/anoAcademicoAction.php"); ?>

<script>
	
$(function() {
		   	   
	dateList = [<?php echo $ano_academico; ?>];
	
	$("#datepicker").datepicker({
								
		beforeShowDay: function(dateToShow){ 
			return [($.inArray($.datepicker.formatDate('yymmdd', dateToShow),dateList) >= 0), ""]; 
		},
	    onSelect: function(dateText, inst) {
			
			$.ajax({
				type:"POST",
				url:"actions/calendarioExibeAction.php",
				dataType:"json",
				data:{data:dateText},
				success: function(data, textStatus, request){
					$("#txtDescricao").html(data['descricao']);		
				}	
			});		  
	   }
	});
	
});
	
</script>

<div id='exibe_calendario' title='Calendário' style='text-align:center;'>
 
	<br /><div id="datepicker"></div>
    
    <br /><span id="txtDescricao"></span>

</div>